package com.zhj.client;

import com.caucho.hessian.client.HessianProxyFactory;
import com.zhj.service.UserService;

import java.net.MalformedURLException;

/**
 * @author zhj
 */
public class ClientMain {
    public static void main(String[] args) throws MalformedURLException, ClassNotFoundException {
        String url = "http://localhost:8888/hi";
        HessianProxyFactory factory = new HessianProxyFactory();
        UserService api = (UserService) factory.create(UserService.class, url);
        System.out.println(api.sayHello("强哥"));
    }
}
